Platform Explorer / Nuxeo Platform 5.8

Extension point plugins

Documentation

The plugin system for the FileManager give the possibility to register extension that will be responsible for creating a document from a given mime-type. The plugin should implement the org.nuxeo.ecm.platform.filemanager.interfaces.FileImporter interface.

The registration of a file importer can be done like this:

    <plugin class="com.example.MyFileImporterImplementationClass"
        enabled="true" name="myCustomFileImporter" order="30">
        <filter>text/plain</filter>
    </plugin>

The filter tag is used to know what mime-types can be used with the plugin. The order tag is used yo determine order between plugins.

A plugin can override an existing plugin by reusing the same name, in this case the previous filters will be ignored. A plugin can be completely disabled by setting enabled="false".

Similarly, to override the default behavior to import folders, custom folder importers are registered as follows:

    <folderImporter
        class="com.example.MyFolderImporterImplementationClass" name="myCustomFolderImporter"/>

The latest registered folder importer will be used in place of any other previously registered folder importer.

Finally is it also possible to register CreationContainerListProvider implementations for a given set of document types so as to provide the user with a list of container suitable for new document creation.

This feature is especially useful for the creation of new document from an office productivity application through the LiveEdit plugins.

The docType is optional: no docType declaration means all types are handled by the extension.

    <creationContainerListProvider
        class="com.example.MyCustomContainerListImplementationClass" name="myCustomContainerListProvider">
        <docType>File</docType>
        <docType>Note</docType>
    </creationContainerListProvider>

Contribution Descriptors

  • Class: org.nuxeo.ecm.platform.filemanager.service.extension.FileImporterDescriptor
  • Class: org.nuxeo.ecm.platform.filemanager.service.extension.FolderImporterDescriptor
  • Class: org.nuxeo.ecm.platform.filemanager.service.extension.CreationContainerListProviderDescriptor

Existing Contributions

Contributions are presented in the same order as the registration order on this extension point. This order is displayed before the contribution name, in brackets.

  • nuxeo-platform-audio-core-5.8.jar
    <extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
        <documentation>
          Simple plugin for the file manager. Creates a Audio Document type from
          any of the matching mime types.
        </documentation>
        <plugin class="org.nuxeo.ecm.platform.audio.extension.AudioImporter" name="AudioImporter" order="10">
          <filter>audio/.*</filter>
        </plugin>
      </extension>
  • nuxeo-platform-imaging-core-5.8.jar
    <extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
        <documentation>
          Simple plugin for the file manager. Creates an Image document from
          any graphic file.
        </documentation>
        <plugin class="org.nuxeo.ecm.platform.picture.extension.ImagePlugin" name="Imageplugin" order="10">
          <filter>image/jpeg</filter>
          <filter>image/gif</filter>
          <filter>image/png</filter>
          <filter>image/tiff</filter>
          <filter>image/bmp</filter>
          <filter>image/x-ms-bmp</filter>
          <!-- RAW images mime type -->
          <filter>image/x-canon-cr2</filter>
          <filter>image/x-canon-crw</filter>
          <filter>image/x-nikon-nef</filter>
          <filter>image/x-adobe-dng</filter>
          <filter>image/x-panasonic-raw</filter>
          <filter>image/x-fuji-raf</filter>
          <filter>image/x-sigma-x3f</filter>
          <filter>image/x-pentax-pef</filter>
          <filter>image/x-kodak-dcr</filter>
          <filter>image/x-kodak-kdc</filter>
          <filter>image/x-sony-sr2</filter>
          <filter>image/x-sony-arw</filter>
          <filter>image/x-sony-srf</filter>
          <filter>image/x-minolta-mrw</filter>
          <filter>image/x-olympus-orf</filter>
          <filter>image/x-raw-epson</filter>
          <filter>image/x-portable-pixmap</filter>
    
          <filter>image/raw</filter>
          <filter>image/x-raw</filter>
    
          <filter>application/illustrator</filter>
          <filter>image/photoshop</filter>
          <filter>application/postscript</filter>
        </plugin>
      </extension>
  • nuxeo-platform-video-core-5.8.jar
    <extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
        <documentation>
          Simple plugin for the file manager. Creates a Video Document type from
          any of the matching mime types.
        </documentation>
        <plugin class="org.nuxeo.ecm.platform.video.importer.VideoImporter" name="VideoImporter" order="10">
          <filter>video/.*</filter>
        </plugin>
      </extension>
  • nuxeo-platform-filemanager-core-5.8.jar
    <extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
        <documentation>
          Default plugins for the file manager.
    
          NoteImporter creates a Note document from any text-based content.
    
          DefaultFileImporter creates a File document from any content.
        </documentation>
    
        <plugin class="org.nuxeo.ecm.platform.filemanager.service.extension.NoteImporter" name="NoteImporter" order="10">
          <filter>text/plain</filter>
          <filter>text/html</filter>
          <filter>application/xhtml+xml</filter>
          <filter>text/x-web-markdown</filter>
        </plugin>
    
        <plugin class="org.nuxeo.ecm.platform.filemanager.service.extension.DefaultFileImporter" name="DefaultFileImporter" order="100">
          <filter>.*</filter>
        </plugin>
    
        <plugin class="org.nuxeo.ecm.platform.filemanager.service.extension.ExportedZipImporter" name="ExportedArchivePlugin" order="10">
          <filter>application/zip</filter>
        </plugin>
    
        <plugin class="org.nuxeo.ecm.platform.filemanager.service.extension.CSVZipImporter" name="CSVArchivePlugin" order="11">
          <filter>application/zip</filter>
        </plugin>
    
        <documentation>
          Use a query model to find the list of all Workspaces the user has the
          right to create new document into.
        </documentation>
        <creationContainerListProvider class="org.nuxeo.ecm.platform.filemanager.service.extension.DefaultCreationContainerListProvider" name="defaultCreationContainerListProvider"/>
      </extension>
  • nuxeo-platform-document-routing-core-5.8.jar
    <extension point="plugins" target="org.nuxeo.ecm.platform.filemanager.service.FileManagerService">
    
        <plugin class="org.nuxeo.ecm.platform.routing.core.persistence.RouteModelsZipImporter" name="RouteModelsImporter" order="5">
          <filter>application/zip</filter>
        </plugin>
      </extension>